home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / CBGRX103.ZIP / contrib / libgrx / test / linetest.c < prev    next >
Text File  |  1993-12-06  |  2KB  |  79 lines

  1. /**
  2.  ** LINETEST.C
  3.  **
  4.  **  Copyright (C) 1992, Csaba Biegl
  5.  **    820 Stirrup Dr, Nashville, TN, 37221
  6.  **    csaba@vuse.vanderbilt.edu
  7.  **
  8.  **  This file is distributed under the terms listed in the document
  9.  **  "copying.cb", available from the author at the address above.
  10.  **  A copy of "copying.cb" should accompany this file; if not, a copy
  11.  **  should be available from where this file was obtained.  This file
  12.  **  may not be distributed without a verbatim copy of "copying.cb".
  13.  **  You should also have received a copy of the GNU General Public
  14.  **  License along with this program (it is in the file "copying");
  15.  **  if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  16.  **  Cambridge, MA 02139, USA.
  17.  **
  18.  **  This program is distributed in the hope that it will be useful,
  19.  **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  **  GNU General Public License for more details.
  22.  **/
  23.  
  24. #include "test.h"
  25.  
  26. TESTFUNC(test1)
  27. {
  28.     GrLineOption o1,o2,o3,o4;
  29.  
  30.     o1.lno_color = GrAllocColor(255,0,0);
  31.     o1.lno_width = 1;
  32.     o1.lno_pattlen = 4;
  33.     o1.lno_dashpat = "\5\5\24\24";
  34.     o2.lno_color = GrAllocColor(255,255,0);
  35.     o2.lno_width = 2;
  36.     o2.lno_pattlen = 6;
  37.     o2.lno_dashpat = "\5\5\24\24\2\2";
  38.     o3.lno_color = GrAllocColor(0,255,255);
  39.     o3.lno_width = 30;
  40.     o3.lno_pattlen = 8;
  41.     o3.lno_dashpat = "\5\5\24\24\2\2\40\40";
  42.     o4.lno_color = GrAllocColor(255,0,255);
  43.     o4.lno_width = 4;
  44.     o4.lno_pattlen = 6;
  45.     o4.lno_dashpat = "\2\2\2\2\10\10";
  46.  
  47.     GrCustomLine(10,10,100,100,&o1);
  48.     GrCustomLine(10,50,100,140,&o1);
  49.     GrCustomLine(10,90,100,180,&o1);
  50.  
  51.     GrCustomLine(110,10,200,100,&o2);
  52.     GrCustomLine(110,50,200,140,&o2);
  53.     GrCustomLine(110,90,200,180,&o2);
  54.  
  55.     GrCustomLine(210,10,300,100,&o3);
  56.     GrCustomLine(210,50,300,140,&o3);
  57.     GrCustomLine(210,90,300,180,&o3);
  58.  
  59.     GrCustomLine(20,300,600,300,&o4);
  60.     GrCustomLine(20,320,600,340,&o4);
  61.     GrCustomLine(20,380,600,360,&o4);
  62.  
  63.     GrCustomLine(400,100,400,300,&o4);
  64.     GrCustomLine(420,100,440,300,&o4);
  65.     GrCustomLine(480,100,460,300,&o4);
  66.     GrCustomLine(600,200,500,300,&o4);
  67.  
  68.     getkey();
  69.  
  70.     GrClearScreen(GrBlack());
  71.  
  72.     GrCustomBox(50,50,550,350,&o3);
  73.     GrCustomCircle(300,200,50,&o2);
  74.  
  75.     getkey();
  76.  
  77. }
  78.  
  79.